/**
 * 泛型在类中的使用
 */
class Work<T>{
    name:string=""
    age:T
    constructor(name:string,age:T){
        this.name=name
        this.age=age
    }
}

const w1=new Work<number>("Ellen",25)
const w2=new Work<string>("King","23")
